package com.sh.data.engine.domain.datadev.offline.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sh.data.engine.domain.datadev.offline.service.DatadevSyncFieldMappingService;
import com.sh.data.engine.repository.dao.datadev.DatadevSyncFieldMappingMapper;
import com.sh.data.engine.repository.dao.datadev.entity.DatatdevSyncFieldMappingEntity;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DatadevSyncFieldMappingServiceImpl
    extends ServiceImpl<DatadevSyncFieldMappingMapper, DatatdevSyncFieldMappingEntity>
    implements DatadevSyncFieldMappingService {

    @Override
    public List<DatatdevSyncFieldMappingEntity> getSyncFieldMappingByNodeId(Long nodeId) {

        LambdaQueryWrapper<DatatdevSyncFieldMappingEntity> eq =
            new LambdaQueryWrapper<DatatdevSyncFieldMappingEntity>()
                .eq(DatatdevSyncFieldMappingEntity::getNodeId, nodeId);
        List<DatatdevSyncFieldMappingEntity> list = list(eq);
        return list;
    }
}
